#!/bin/sh
#
# $OpenBSD: openfire.rc,v 1.5 2017/05/27 19:57:06 ajacoutot Exp $

OPENFIRE_HOME="${TRUEPREFIX}/openfire"
OPENFIRE_LIB="${OPENFIRE_HOME}/lib"

JAVACMD="$(${LOCALBASE}/bin/javaPathHelper -c openfire)"
JAVA_HOME="$(${LOCALBASE}/bin/javaPathHelper -h openfire)"

daemon="${JAVACMD}"
daemon_flags="-server -DopenfireHome=${OPENFIRE_HOME} -Dopenfire.lib.dir=${OPENFIRE_LIB} -jar ${OPENFIRE_LIB}/startup.jar"
daemon_user="_openfire"

. /etc/rc.d/rc.subr

rc_bg=YES
rc_reload=NO

rc_cmd $1
